<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>搜索</title>
		<link rel="stylesheet" type="text/css" href="../static/css/site.css" 
			th:href="@{/css/site.css}"/>
		<link rel="stylesheet" type="text/css" href="../static/css/search.css"
			th:href="@{/css/search.css}"/>
	</head>
	<body>
		<div th:replace="frag::header" id="header"></div>
		
		<!-- 查询区域 -->
		<div class="main">
			<div class="crumbs">
				<div class="container">
					<a href="">首页</a>
					>
					<a href="">全部结果</a>
					>
					<a href="">手机</a>
				</div>
			</div>
			<div class="sort">
				<div class="container">
					<ul class="clear first-sort">
						<span class="label">一级分类:</span>
						<li class="active"><a href="">全部</a></li>
						<li><a href="">红米手机</a></li>
						<li><a href="">小米手机</a></li>
						<li><a href="">黑鲨手机</a></li>
					</ul>
					<ul class="clear second-sort">
						<span class="label">二级分类:</span>
						<li class="active"><a href="">全部</a></li>
						<li><a href="">红米手机</a></li>
						<li><a href="">小米手机</a></li>
						<li><a href="">黑鲨手机</a></li>
					</ul>
				</div>
			</div>
			<div class="order">
				<div class="container">
					<ul class="clear">
						<li class="active"><a href="">综合</a></li>
						<li><a href="">新品</a></li>
						<li><a href="">销量</a></li>
						<li><a href="">价格</a></li>
					</ul>
				</div>
			</div>
			<div class="goods container">
				<ul class="clear">
					<li>
						<a href="goods.html">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li>
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li>
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li class="r">
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					
					
					<!-- 又一行 -->
					<li>
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li>
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li>
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
					<li class="r">
						<a href="">
							<div class="img">
								<img src="../static/img/phone.jpg" >
							</div>
							<h2 class="desc">黑鲨4S 12+256G</h2>
							<p class="price">3299元 起</p>
							<div class="thumbs">
								<ul class="clear">
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
									<li><img src="../static/img/phone.jpg" ></li>
								</ul>
							</div>
							<div class="flags">
								<span>赠</span>
								<span>加价购</span>
							</div>
						</a>
					</li>
				</ul>
			</div>
		</div>
		
		<!-- 底部 -->
		<div th:replace="frag::footer" id="footer"></div>
		
		<!-- 引入jQuery -->
		<script type="text/javascript" src="../static/js/jquery-2.1.4.js" th:src="@{/js/jquery-2.1.4.js}"></script>
		<!-- 引入search.js -->
		<script type="text/javascript" src="../static/js/search.js" th:src="@{/js/search.js}"></script>
		<script th:if="false">
			// 动态页面需要去掉
			$("#header").load("header.html");
			$("#footer").load("footer.html");
		</script>
		<!-- 获取参数 -->
		<script type="text/javascript">
			//获取参数传递过来的分类的id
			var categoryId = [[${param.categoryId==null ? 'null' : param.categoryId}]];
			// 获取参数传过来的name
			var name = "[[${param.name==null ? '' : param.name}]]";
			
			// 异步搜索
			searchGoods(name, categoryId);
			
			// 加载一级分类
			getFirstSort();
			
		</script>
		
	</body>
</html>
